package domain;

import java.util.Date;

//这是一个账单类，对应一张账单表账单表里面有所有用户的 购买的商品名称ID，数量，总价格，付款时间(now()),支付方式客户ID
// (不显示出来，但是要用这个查找)
//id(主键),productName,myQuantity,money,paymentTime,paymentMode,ClientID
/*
* CREATE TABLE Bill (
    id INT AUTO_INCREMENT PRIMARY KEY,
    productName VARCHAR(255) NOT NULL,
    productID INT NOT NULL,
    myQuantity INT NOT NULL,
    money DECIMAL(10, 2) NOT NULL,
    paymentTime DATETIME NOT NULL,
    paymentMode VARCHAR(50) NOT NULL,
    ClientID INT NOT NULL
);*/
public class Bill {
    private Integer id;
    private String productName;
    private Integer myQuantity;
    private Double money;
    private Date paymentTime;
    private String paymentMode;
    private Integer ClientID;

    public Bill() {
    }

    public Bill(Integer id, String productName, Integer myQuantity, Double money,
                Date paymentTime, String paymentMode, Integer clientID) {
        this.id = id;
        this.productName = productName;
        this.myQuantity = myQuantity;
        this.money = money;
        this.paymentTime = paymentTime;
        this.paymentMode = paymentMode;
        ClientID = clientID;
    }

    @Override
    public String toString() {
        return
               "\t\t\t"+ id +
                       "\t\t\t"+productName +
                       "\t\t\t"+ myQuantity +
                       "\t\t\t\t"+ money +
                       "\t\t\t"+ paymentTime +
                       "\t\t\t"+ paymentMode;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Integer getMyQuantity() {
        return myQuantity;
    }

    public void setMyQuantity(Integer myQuantity) {
        this.myQuantity = myQuantity;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Date getPaymentTime() {
        return paymentTime;
    }

    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    public String getPaymentMode() {
        return paymentMode;
    }

    public void setPaymentMode(String paymentMode) {
        this.paymentMode = paymentMode;
    }

    public Integer getClientID() {
        return ClientID;
    }

    public void setClientID(Integer clientID) {
        ClientID = clientID;
    }
}
